# Prepared by Tim Waring
# for publication
# 2020.07.13


library(broom)
library(tidyverse)


# 7 fishermen played the game solo, with no social information
# the most successful of them was used as the social learning "model"
models <- read_csv("/Users/twaring/Documents/Research/CSP/data/models.csv")

# organize data
models <- models %>%
	gather(starts_with("player"), key="player",value="highdeck") %>%
	mutate(player = str_replace(player,"player",""))  %>%
	mutate(player = as.numeric(player))

#  summarize
models %>%
	group_by(player) %>%
	summarize(mean=mean(highdeck))

# player 6 chose the high deck most often
# But player 7 had highest total payoff
# player 7 was deemed "most successful" and
# was used as model

